function Enemy(sprite, player) {
	this.sprite = sprite;
	this.player = player;
	this.shield = 2;
	this.speedx = -5;
	this.speedy = 0; 
};

Enemy.prototype.damage = function() {
	return (--this.shield <= 0);
};

Enemy.prototype.update = function() {
	if(this.speedx) {
		this.sprite.left += this.speedx;
	}
	
	if(this.speedy) {
		this.sprite.top += this.speedy;
	}
	
	return this.sprite.updatePosition().inViewport();
};
